<?php

print '<h1>Testing DB Connection</h1>';
print '<h2>Postgres Jan 11 324</h2>';

require_once "lib/class.morphini.php";

$Morph = new MorphIni();
$dbhost = $Morph->db_hostname;
$dbport = $Morph->db_port;
$dbtype = $Morph->db_type;
$dbname = $Morph->db_name;
$dbuser = $Morph->db_username;
$dbpass = $Morph->db_password;

$dbconn = "host=$dbhost port=$dbport dbname=$dbname user=$dbuser password=$dbpass";
print "<pre>";
#print "$dbconn\n";

$dbconn = pg_connect($dbconn)
   or die("Could not connect\n");
echo "Connected successfully\n";
pg_close($dbconn);

print "</pre>";
?>